# -*- coding: utf-8 -*-

# 通用定义
UP = (0, -1)
DOWN = (0, 1)
LEFT = (-1, 0)
RIGHT = (1, 0)

UP_UP = (0, -2)
DOWN_DOWN = (0, 2)
LEFT_LEFT = (-2, 0)
RIGHT_RIGHT = (2, 0)
RIGHT_UP = (1, -1)
LEFT_UP = (-1, -1)
LEFT_DOWN = (-1, 1)
RIGHT_DOWN = (1, 1)

# 游戏参数
GAME_NAME = 'SNAKE GAME'
CELL = 25
COL = 24
ROW = 16
WIDTH = COL * CELL
HEIGHT = ROW * CELL
FPS = 60
FONT_NAME = 'arial'
FONT_SIZE = 15
ICON = 'res/snake.png'
HIT_SOUND = 'res/hit.wav'
EAT_SOUND = 'res/eat.wav'

# 蛇初始参数
INIT_SPEED = 2
INIT_POS = (COL / 2, ROW / 2)
INIT_LENGTH = 5
INIT_DIRECTION = RIGHT
ALIVE_HEAD_COLOR = (0, 255, 0)
ALIVE_BODY_COLOR = (0, 255, 255)
DEAD_HEAD_COLOR = (192, 192, 192)
DEAD_BODY_COLOR = (192, 192, 192)
